import { Component } from '@angular/core';

import { Hero3 }    from './hero3';
import { Hero3Service } from './hero.service';


@Component({
  selector: 'hero3-list',
  template: `
  <div *ngFor="let hero of heroes3">
    {{hero.id}} - {{hero.name}}
  </div>`
})

export class Hero2ListComponent {
  heroes3 = [];

  construct(heroService: Hero3Service) {
    this.heroes3 = heroService.getHeroes();
  }
}
